import React from 'react';
import { useState } from 'react';
// 引入子组件
import Child from './Child';
const Father = () => {
    const [count, setCount] = useState(0)
    return (
        <div>
            {/* 显示count */}
            <p onClick={() => {
                setCount(count + 1)
            }}>count:{count}</p>
            <hr />
            {/* 使用父组件 */}
            <Child></Child>

        </div>
    );
}

export default Father;
